import React from 'react'
import { useHistory} from 'react-router-dom'
import { FinancialFromMap } from '../../../assets/enum'
//style
import { AddMoneyApplyAll } from './style'
import { PageHeader, Card, Row, Col } from 'antd'

/**
/* @description: 费用申请页面
/* @author: xiaoxujs
/* @updata: xiaoxujs（2021-07-27）创建费用申请页面
*/

const AddMoneyApply = () => {
    const history = useHistory()
    //进入费用申请页面
    const handleEnterMoneyAoolyPage = (type) => {
        history.push({pathname: '/moneyApplyForm', state: {
            financialApplyType: type
        }})
    }
    return <AddMoneyApplyAll>
        <PageHeader
            className="site-page-header"
            title="费用申请"
        />
        <Row gutter={{ xs: 8, sm: 16, md: 24, lg: 32 }}>
            {
                FinancialFromMap.map(item => <Col key={item.value} className="gutter-row" span={6}>
                    <Card 
                        title={item.babel} 
                        style={{ width: 300, height: 300, cursor:'pointer'}} 
                        onClick = {() => handleEnterMoneyAoolyPage(item.value)} 
                    >

                    </Card>
                </Col>)
            }
        </Row>

    </AddMoneyApplyAll>
}

export default AddMoneyApply